home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 July
/
CMCD0704.ISO
/
Software
/
Shareware
/
Comunicatii
/
feedaemon
/
fd110rc5.exe
/
{app}
/
Data
/
defaults
/
styles
/
Serif.fdxsl
< prev
Wrap
Extensible Markup Language
|
2004-02-16
|
6KB
|
152 lines
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
<xsl:output method="html"/>
<xsl:variable name="common-styles">
<style type="text/css">
body { font: 85%/150% Georgia, serif; margin: 22px 30px; background-color: #fff; }
a { color: #003399; text-decoration: none;}
a:hover { color: #6B8ADE; text-decoration: underline; }
span.nodescription { font-size: x-small; color: silver;}
div.newspapertitle { font: 140% "Trebuchet MS", Tahoma, Arial, sans-serif; font-weight: bold; text-align: left; border-bottom: 6px double #CC3380; margin-bottom: 28px; padding-bottom: 14px; }
div.channeltitle { font-size: larger; font-weight: bold; text-transform: uppercase; margin-top: 18px; margin-bottom: 18px;}
div.newsitemdate { font-size: xx-small; color: gray; font-style: italic; text-align: left; font-weight: normal; margin-top: 4px; margin-bottom: 4px; }
div.newsitemcontent { border-bottom: 1px solid #99ccff; margin-bottom: 22px; padding-bottom: 22px; }
div.newsitemcontent ol, div.newsitemcontent ul { list-style-position: inside;}
div.newsitemcontent a { text-decoration: underline; }
div.newsitemtitle { font-weight: bold; }
div.newsitemtitle, div.newsitemcontent, div.newsitemdate { margin-left: 24px;}
img.channel { float: right; border: none; margin-right: 8px;}
img { clear: both; }
</style>
</xsl:variable>
<!-- channel group newspaper -->
<xsl:template match="newspaper[@type='group']">
<html xmlns:m="http://www.w3.org/1998/Math/MathML">
<head>
<title>Group Newspaper</title>
<xsl:copy-of select="$common-styles"/>
</head>
<body>
<div class="newspapertitle"><xsl:value-of select="title" disable-output-escaping="yes"/></div>
<!-- loop through each channel -->
<xsl:for-each select="channel">
<xsl:variable name="chanlink" select="link"/>
<xsl:variable name="chantitle" select="title"/>
<div class="channeltitle">
<!-- channel image -->
<xsl:if test="image">
<xsl:variable name="imgurl" select="image/url"/>
<xsl:variable name="imgtitle" select="image/title"/>
<xsl:variable name="imglink" select="image/link"/>
<a href="{$imglink}"><img class="channel" src="{$imgurl}" alt="{$imgtitle}"/></a>
</xsl:if>
<a href="{$chanlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
</div>
<!-- loop through each news item -->
<xsl:for-each select="item">
<xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
<div class="newsitemtitle">
<xsl:variable name="itemlink" select="link"/>
<a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
</div>
<div class="newsitemdate"><xsl:value-of select="fd:dateDisplay"/></div>
<div class="newsitemcontent">
<xsl:value-of select="description" disable-output-escaping="yes"/>
</div>
</xsl:for-each>
</xsl:for-each>
</body>
</html>
</xsl:template>
<!-- channel newspaper -->
<xsl:template match="newspaper[@type='channel']">
<html xmlns:m="http://www.w3.org/1998/Math/MathML">
<head>
<title>Channel Newspaper</title>
<xsl:copy-of select="$common-styles"/>
</head>
<body>
<div class="newspapertitle">
<!-- channel image -->
<xsl:if test="channel/image">
<xsl:variable name="imgurl" select="channel/image/url"/>
<xsl:variable name="imgtitle" select="channel/image/title"/>
<xsl:variable name="imglink" select="channel/image/link"/>
<a href="{$imglink}"><img class="channel" src="{$imgurl}" alt="{$imgtitle}"/></a>
</xsl:if>
<!-- channel title -->
<xsl:value-of select="title" disable-output-escaping="yes"/>
</div>
<!-- loop through each news item -->
<xsl:for-each select="channel/item">
<xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
<div class="newsitemtitle">
<xsl:variable name="itemlink" select="link"/>
<a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
</div>
<div class="newsitemdate"><xsl:value-of select="fd:dateDisplay"/></div>
<div class="newsitemcontent">
<xsl:value-of select="description" disable-output-escaping="yes"/>
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
<!-- single news item -->
<xsl:template match="newspaper[@type='newsitem']">
<html xmlns:m="http://www.w3.org/1998/Math/MathML">
<head>
<title>News Item</title>
<xsl:copy-of select="$common-styles"/>
<style>
div.newspapertitle { margin-bottom: 14px; }
</style>
</head>
<body>
<xsl:for-each select="channel/item">
<div class="newspapertitle">
<xsl:variable name="itemlink" select="link"/>
<a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
</div>
<div class="newsitemdate"><xsl:value-of select="fd:dateDisplay"/></div>
<div class="newsitemcontent">
<xsl:value-of select="description" disable-output-escaping="yes"/>
<!-- add link to comments if available -->
<xsl:if test="comments">
<xsl:variable name="commentlink" select="comments"/>
<xsl:variable name="commentimg" select="'$IMAGEDIR$comments.gif'"/>
<a href="{$commentlink}"><img src="{$commentimg}" border="0" hspace="6"/></a>
</xsl:if>
<!-- add link to enclosure if available -->
<xsl:if test="enclosure">
<xsl:variable name="enclosurelink" select="enclosure/@url"/>
<xsl:variable name="enclosureimg" select="'$IMAGEDIR$enclosure.gif'"/>
<a href="{$enclosurelink}"><img src="{$enclosureimg}" border="0" hspace="6"/></a>
</xsl:if>
</div>
</xsl:for-each>
<!-- channel image -->
<xsl:if test="channel/image">
<xsl:variable name="imgurl" select="channel/image/url"/>
<xsl:variable name="imgtitle" select="channel/image/title"/>
<xsl:variable name="imglink" select="channel/image/link"/>
<a href="{$imglink}"><img class="channel" src="{$imgurl}" alt="{$imgtitle}"/></a>
</xsl:if>
</body>
</html>
</xsl:template>
</xsl:stylesheet>